﻿@model ShoppingCartModel
@using Nop.Core.Domain.Orders;
@using Nop.Web.Framework;
@using Nop.Web.Models.ShoppingCart;
<tfoot>
    <tr id="promotion_row">
        <th colspan="7">
            <div class="promotion">
                <div class="wrap_unlogin" style="display: none;">
                </div>
                <div id="promotion_list" class="promotion_list" style="display: none;">
                    <h3 class="hd">
                        您满足以下促销活动，请选择一个参加：<span>（每笔订单只能参加一个促销活动，参加促销活动后本次订单不能使用优惠券）</span></h3>
                    <ul class="bd">
                        <li>
                            <label>
                                <input name="promo_rule" value="0" type="radio">不参加促销活动 / 我要使用优惠券</label>
                            <b class="icon_selected"></b></li>
                    </ul>
                </div>
                <div id="promotion_list_buy_more">
                </div>
            </div>
        </th>
    </tr>
    <tr>
        <th colspan="7">
            <div class="price_check_box">
                @Html.Action("OrderTotals", "ShoppingCart", new { isEditable = Model.IsEditable })
                <div class="clear">
                    <b class="icon icon_clear"></b><a href="#" id="myClearCart">清空购物车</a>
                </div>
            </div>
        </th>
    </tr>
</tfoot>
<tbody>
    @if (Model.Items.Count > 0)
    {
        foreach (var item in Model.Items)
        {
        <tr>
            <td class="bl">
                <div class="wrap_goods">
                    <span class="img"><a href="#" target="_top">
                        <img style="width: 80px;" src="@item.Picture.ImageUrl"></a> </span>
                    <div class="goods_info">
                        <p class="name">
                            <a href="@Url.RouteUrl("ProductBuy", new { productId = item.ProductId })" target="_top" title="@item.ProductName">@Html.GetSubString(item.ProductName,10,"")</a></p>
                        <p class="condition">
                        </p>
                    </div>
                </div>
            </td>
            <td>
                <p class="strong">
                    <span class="i_yuan">¥</span>@item.UnitPrice</p>
            </td>
            <td>
                <span class="wrap_input" productVariantId="@item.ProductVariantId" unitPrice="@item.UnitPrice">
                    <span class="jian" subtract="subtract">-</span> <span class="input">
                        <input id="pnum_171043" value="@item.Quantity" numlimit="5" numlowest="1" multipricenumlimit="99"
                        curnum="1" type="text" productVariantId="@item.ProductVariantId" unitPrice="@item.UnitPrice">
                    </span><span class="jia" add="add">+</span> </span>
            </td>
            <td>
                <p class="yx_price">
                    <span class="i_yuan"><b>¥</b> <b productVariantId="@item.ProductVariantId">@item.SubTotal</b>
                    </span>
                </p>
            </td>
            <td>
                <span class="i_yuan">@Html.Raw(item.Manufacturer==null?"":@item.Manufacturer.Name)</span>
            </td>
            <td>
                有货，可当日出库
            </td>
            <td class="todo_link br cart_act">
                <a href="#">收藏</a> <a href="#" cartItemId="@item.Id" mydelete="mydelete">删除</a>
            </td>
        </tr>
        }

    }
</tbody>
